package starcoast.bocai.com.starcoast.activitys.work;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
import android.view.View;
import android.widget.LinearLayout;

import butterknife.Bind;
import butterknife.ButterKnife;
import starcoast.bocai.com.starcoast.R;
import starcoast.bocai.com.starcoast.common.BaseActivity;

/**
 * Created by admin on 2016/6/14.
 */
public class MobileOfficeActivity extends BaseActivity implements View.OnClickListener {
    @Bind(R.id.mobile_post)
    LinearLayout mobile_post;
    @Bind(R.id.mobile_contacts)
    LinearLayout mobile_contacts;
    @Bind(R.id.mobile_memorandum)
    LinearLayout mobile_memorandum;
    @Bind(R.id.mobile_holiday)
    LinearLayout mobile_holiday;
    @Bind(R.id.mobile_meet)
    LinearLayout mobile_meet;
    @Bind(R.id.mobile_approval)
    LinearLayout mobile_approval;
    @Bind(R.id.toolbar)
    Toolbar toolbar;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_mobile_office);
        ButterKnife.bind(this);
        initview();
        initToolbar("移动办公");
        initToolBack();
        toolbar.inflateMenu(R.menu.menu_add);
        toolbar.setOnMenuItemClickListener(new Toolbar.OnMenuItemClickListener() {
            @Override
            public boolean onMenuItemClick(MenuItem item) {
                startActivity(new Intent(MobileOfficeActivity.this,AddCompanyActivity.class));
                return false;
            }
        });
    }
    public void initview(){
        mobile_post.setOnClickListener(this);
        mobile_contacts.setOnClickListener(this);
        mobile_memorandum.setOnClickListener(this);
        mobile_holiday.setOnClickListener(this);
        mobile_meet.setOnClickListener(this);
        mobile_approval.setOnClickListener(this);
    }
    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.mobile_post:
                startActivity(new Intent(MobileOfficeActivity.this,AnnounceActivity.class));
                break;
            case R.id.mobile_contacts:
                startActivity(new Intent(MobileOfficeActivity.this,ContactsActivity.class));
                break;
            case R.id.mobile_memorandum:
                startActivity(new Intent(MobileOfficeActivity.this,MemorandumActivity.class));
                break;
            case R.id.mobile_holiday:
                startActivity(new Intent(MobileOfficeActivity.this,HolidayActivity.class));
                break;
            case R.id.mobile_meet:
                startActivity(new Intent(MobileOfficeActivity.this,AnnounceActivity.class));
                break;
            case R.id.mobile_approval:
                startActivity(new Intent(MobileOfficeActivity.this,AnnounceActivity.class));
                break;
        }
    }
}
